/* 3.12.07 dashboard refresh: School Snapshot hero metadata and light section cards */
.aa-home-page {
    --aa-dashboard-snapshot-surface: linear-gradient(128deg, #6558e8 0%, #5b79ec 42%, #1492cf 100%);
    --aa-dashboard-snapshot-panel: rgba(255,255,255,0.14);
    --aa-dashboard-snapshot-border: rgba(255,255,255,0.24);
    --aa-home-surface-violet: linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
    --aa-home-border-violet: #e2dbff;
    --aa-home-surface-teal: linear-gradient(180deg, #f5fffc 0%, #ffffff 100%);
    --aa-home-border-teal: #cfeee4;
    --aa-home-surface-blue: linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
    --aa-home-border-blue: #d7e7ff;
    --aa-home-surface-orange: linear-gradient(180deg, #fff8f1 0%, #ffffff 100%);
    --aa-home-border-orange: #ffe2bf;
    --aa-home-surface-pink: linear-gradient(180deg, #fff7fc 0%, #ffffff 100%);
    --aa-home-border-pink: #f4d7ea;
}

.aa-home-page .aa-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.8fr) auto;
    gap: clamp(16px, 2vw, 28px);
    align-items: stretch;
    min-height: 192px;
    background: var(--aa-dashboard-snapshot-surface);
}

.aa-home-page .aa-dashboard-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aa-home-page .aa-dashboard-hero-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 18px 20px;
    color: #ffffff;
    background: var(--aa-dashboard-snapshot-panel);
    border: 1px solid var(--aa-dashboard-snapshot-border);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
}

.aa-home-page .aa-dashboard-hero-meta-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.aa-home-page .aa-dashboard-hero-meta-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    color: rgba(255,255,255,0.96);
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.aa-home-page .aa-dashboard-hero-meta-title {
    color: #ffffff;
    font-size: clamp(1.02rem, 1.9vw, 1.24rem);
    font-weight: 760;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.aa-home-page .aa-dashboard-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.aa-home-page .aa-dashboard-hero-stat {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 10px 12px;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 14px;
}

.aa-home-page .aa-dashboard-hero-stat-value {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 760;
    letter-spacing: -0.03em;
    line-height: 1;
}

.aa-home-page .aa-dashboard-hero-stat-label {
    color: rgba(255,255,255,0.86);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
}

.aa-home-page .aa-dashboard-hero-meta-datetime {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.aa-home-page .aa-dashboard-hero-meta-date {
    color: rgba(255,255,255,0.84);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.35;
}

.aa-home-page .aa-dashboard-hero-meta-time {
    color: #ffffff;
    font-size: clamp(1.32rem, 2.2vw, 1.72rem);
    font-weight: 760;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.aa-home-page .aa-dashboard-hero-meta-note {
    color: rgba(255,255,255,0.72);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.aa-home-page [data-aa-workspace-widget="snapshot"] {
    background: var(--aa-home-surface-violet) !important;
    border-color: var(--aa-home-border-violet) !important;
}

.aa-home-page [data-aa-workspace-widget="publications"],
.aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] {
    background: var(--aa-home-surface-teal) !important;
    border-color: var(--aa-home-border-teal) !important;
}

.aa-home-page [data-aa-workspace-widget="quick-actions"] {
    background: var(--aa-home-surface-orange) !important;
    border-color: var(--aa-home-border-orange) !important;
}

.aa-home-page .aa-dashboard-activity[data-aa-workspace-widget="activity"] .aa-dashboard-activity-panel {
    background: var(--aa-home-surface-blue) !important;
    border-color: var(--aa-home-border-blue) !important;
}

.aa-home-page .aa-quick-actions[data-aa-workspace-widget="quick-actions"] .aa-quick-actions-header,
.aa-home-page .aa-dashboard-activity[data-aa-workspace-widget="activity"] .aa-dashboard-activity-header,
.aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] > .aau-dashboard-mini-header {
    border-bottom-color: rgba(115, 115, 145, 0.14) !important;
}

.aa-home-page .aa-quick-action,
.aa-home-page .aa-experience-card,
.aa-home-page .aau-dashboard-category-links > *,
.aa-home-page .aau-dashboard-mini-grid > *,
.aa-home-page [data-aa-dashboard-card-tone] {
    border-radius: 16px !important;
    box-shadow: none !important;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.aa-home-page [data-aa-dashboard-card-tone="violet"] {
    background: var(--aa-home-surface-violet) !important;
    border: 1px solid var(--aa-home-border-violet) !important;
}

.aa-home-page [data-aa-dashboard-card-tone="teal"] {
    background: var(--aa-home-surface-teal) !important;
    border: 1px solid var(--aa-home-border-teal) !important;
}

.aa-home-page [data-aa-dashboard-card-tone="blue"] {
    background: var(--aa-home-surface-blue) !important;
    border: 1px solid var(--aa-home-border-blue) !important;
}

.aa-home-page [data-aa-dashboard-card-tone="orange"] {
    background: var(--aa-home-surface-orange) !important;
    border: 1px solid var(--aa-home-border-orange) !important;
}

.aa-home-page [data-aa-dashboard-card-tone="pink"] {
    background: var(--aa-home-surface-pink) !important;
    border: 1px solid var(--aa-home-border-pink) !important;
}

.aa-home-page .aa-quick-action:hover,
.aa-home-page .aa-quick-action:focus-visible,
.aa-home-page .aa-experience-card:hover,
.aa-home-page .aa-experience-card:focus-within,
.aa-home-page .aau-dashboard-category-links > *:hover,
.aa-home-page .aau-dashboard-mini-grid > *:hover,
.aa-home-page [data-aa-dashboard-card-tone]:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(44, 56, 92, 0.08) !important;
}

.aa-home-page .aa-quick-action-icon,
.aa-home-page .aa-experience-card-icon {
    border-radius: 12px;
}

.aa-home-page .aad-home-overview [data-aa-dashboard-card-tone] {
    min-width: 0;
}


@media (max-width: 1180px) {
    .aa-home-page .aa-dashboard-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .aa-home-page .aa-dashboard-hero {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
    }

    .aa-home-page .aa-dashboard-hero-mark {
        display: none;
    }
}

@media (max-width: 700px) {
    .aa-home-page .aa-dashboard-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }


    .aa-home-page .aa-dashboard-hero-stats {
        grid-template-columns: 1fr;
    }

    .aa-home-page .aa-dashboard-hero-meta-datetime {
        align-items: flex-start;
        flex-direction: column;
    }

    .aa-home-page .aa-dashboard-hero-meta {
        padding: 16px 18px;
    }
}

html[data-aa-colour-scheme="dark"] body.aa-app.aa-home-page:not(.aa-public-page) .aa-dashboard-hero-meta {
    background: rgba(16, 23, 42, 0.25);
    border-color: rgba(255,255,255,0.14);
}

html[data-aa-colour-scheme="dark"] body.aa-app.aa-home-page:not(.aa-public-page) [data-aa-dashboard-card-tone],
html[data-aa-colour-scheme="dark"] body.aa-app.aa-home-page:not(.aa-public-page) .aau-dashboard-category-links > *,
html[data-aa-colour-scheme="dark"] body.aa-app.aa-home-page:not(.aa-public-page) .aau-dashboard-mini-grid > * {
    box-shadow: none !important;
}

/* ========================================================================== 
   3.12.07 Dashboard hero compact controls + Publications section spacing
   ========================================================================== */

/* Remove the decorative academic-cap tile and reclaim its layout track. */
.aa-home-page .aa-dashboard-hero-mark {
    display: none !important;
}

.aa-home-page .aa-dashboard-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: clamp(18px, 2vw, 26px);
}

/* Keep the school badge compact instead of stretching across the left pane. */
.aa-home-page .aa-dashboard-eyebrow {
    width: max-content !important;
    max-width: min(100%, 240px);
    align-self: flex-start;
    white-space: nowrap;
}

/* Keep Customise Dashboard compact/content-sized while preserving its summary. */
.aa-home-page .aa-dashboard-customise {
    width: auto !important;
    max-width: min(100%, 380px);
    align-self: flex-start;
    justify-content: flex-start;
    padding-inline: 14px !important;
    white-space: nowrap;
}

.aa-home-page .aa-dashboard-customise .aa-workspace-summary {
    min-width: 0;
    white-space: nowrap;
}

/* Add visual separation before/after the Newest From School / Latest Publications grid. */
.aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] .aau-dashboard-mini-grid,
.aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] .aau-dashboard-mini-grid {
    margin-top: 16px !important;
    margin-bottom: 18px !important;
}

@media (max-width: 980px) {
    .aa-home-page .aa-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .aa-home-page .aa-dashboard-hero-meta {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .aa-home-page .aa-dashboard-eyebrow,
    .aa-home-page .aa-dashboard-customise {
        max-width: 100%;
    }

    .aa-home-page .aa-dashboard-customise {
        white-space: normal;
    }
}

/* ========================================================================== 
   v3.12.08 Latest Publications Section Spacing Polish
   Adds true inner padding around the Newest From School section and a clearer
   card grid rhythm. This intentionally overrides the compact events.css grid
   gap used by the underlying dashboard component.
   ========================================================================== */
.aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] .aau-dashboard-latest,
.aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] .aau-dashboard-latest {
    padding: 20px 18px 26px !important;
}

.aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] .aau-dashboard-latest_heading,
.aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] .aau-dashboard-latest_heading {
    margin: 0 0 16px !important;
}

.aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] .aau-dashboard-latest .aau-dashboard-mini-grid,
.aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] .aau-dashboard-latest .aau-dashboard-mini-grid {
    margin: 0 !important;
    padding: 2px 0 4px !important;
    column-gap: 12px !important;
    row-gap: 14px !important;
}

.aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] .aau-dashboard-publication-tools,
.aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] .aau-dashboard-publication-tools {
    margin-top: 0 !important;
    padding-top: 18px !important;
    border-top: 1px solid rgba(115, 115, 145, 0.12);
}

@media (max-width: 700px) {
    .aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] .aau-dashboard-latest,
    .aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] .aau-dashboard-latest {
        padding: 17px 14px 22px !important;
    }

    .aa-home-page .aau-dashboard-publications[data-aa-workspace-widget="publications"] .aau-dashboard-latest .aau-dashboard-mini-grid,
    .aa-home-page .aau-dashboard-publications[data-aau-dashboard-home] .aau-dashboard-latest .aau-dashboard-mini-grid {
        gap: 12px !important;
    }
}


/* 3.12.11 live attendance privacy + snapshot states */

.aa-home-page .aa-dashboard-hero-attendance {
    display: grid;
    gap: 12px;
}

.aa-home-page .aa-dashboard-hero-attendance[hidden] {
    display: none !important;
}

.aa-home-page .aa-dashboard-hero-meta.is-attendance-loading .aa-dashboard-hero-stat-value {
    opacity: .72;
}
.aa-home-page .aa-dashboard-hero-meta.is-attendance-live .aa-dashboard-hero-stat-value {
    opacity: 1;
}
.aa-home-page .aa-dashboard-hero-meta.is-attendance-unavailable .aa-dashboard-hero-stat-value {
    opacity: .72;
}


/* ========================================================================== 
   v3.12.15 Parent Dashboard Stable Recovery & Child Card Polish
   ========================================================================== */
.aa-home-page .aa-dashboard-hero-meta-time-stack {
    display: grid;
    justify-items: end;
    gap: 5px;
    min-width: max-content;
}

.aa-home-page .aa-dashboard-hero-meta-time-stack .aa-dashboard-hero-meta-note {
    line-height: 1;
    text-align: end;
    text-transform: none;
}

.aa-home-page .aa-parent-child-status-list {
    display: grid;
    gap: 7px;
}

.aa-home-page .aa-parent-child-status-list[hidden] {
    display: none !important;
}

.aa-home-page .aa-parent-child-status {
    padding: 9px 12px;
    color: rgba(255,255,255,0.96);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 12px;
    font-size: 0.83rem;
    font-weight: 650;
    line-height: 1.3;
}

/* Parent Profile Photo upload: keep the native file picker readable and make
   the submit action compact instead of inheriting the global square control. */
body.aa-home-page .aa-sidebar form:has(input[type="file"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    width: 100%;
}

body.aa-home-page .aa-sidebar form:has(input[type="file"]) input[type="file"] {
    grid-column: 1 / -1;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    min-height: 40px;
    padding: 4px !important;
    color: var(--aa-text, #303342) !important;
    background: #ffffff !important;
    border: 1px solid var(--aa-border, #dfe3ec) !important;
    border-radius: 10px !important;
    font-size: 0.76rem !important;
}

body.aa-home-page .aa-sidebar form:has(input[type="file"]) input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-inline-end: 8px;
    padding: 5px 10px;
    color: #493ca2;
    background: #f4f1ff;
    border: 1px solid #d8d1ff;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

body.aa-home-page .aa-sidebar form:has(input[type="file"]) :is(button:not([type]), button[type="submit"], input[type="submit"]) {
    width: auto !important;
    min-width: 64px !important;
    max-width: 110px !important;
    min-height: 38px !important;
    padding: 7px 12px !important;
    color: #493ca2 !important;
    background: #f4f1ff !important;
    border: 1px solid #d8d1ff !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
}

body.aa-home-page .aa-sidebar form:has(input[type="file"]) :is(button:not([type]), button[type="submit"], input[type="submit"]):hover,
body.aa-home-page .aa-sidebar form:has(input[type="file"]) :is(button:not([type]), button[type="submit"], input[type="submit"]):focus-visible {
    color: #3e318f !important;
    background: #ece7ff !important;
    border-color: #c9c0ff !important;
}

/* Replace the legacy name-only parent student block with a useful linked card. */
#content-inner.aa-workspace-layout-host > [data-aa-parent-student-intro-replaced="true"] {
    display: none !important;
}

#content-inner.aa-workspace-layout-host > .aa-parent-children-card {
    order: 0 !important;
    min-width: 0;
}

.aa-parent-children-card {
    padding: 16px;
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
    border: 1px solid #dce5f7;
    border-radius: 18px;
    box-shadow: none;
}

.aa-parent-children-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(91, 105, 145, 0.13);
}

.aa-parent-children-card-header h2 {
    margin: 0 !important;
    color: var(--aa-text, #262936);
    font-size: 1rem !important;
    font-weight: 760 !important;
}

.aa-parent-children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.aa-parent-child-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 12px 13px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid #dce8f6;
    border-radius: 14px;
}

.aa-parent-child-card-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.aa-parent-child-card-name {
    color: var(--aa-text, #262936);
    font-size: 0.9rem;
    font-weight: 760;
    line-height: 1.25;
}

.aa-parent-child-card-status {
    color: var(--aa-text-secondary, #646a78);
    font-size: 0.75rem;
    line-height: 1.35;
}

.aa-parent-child-card-link {
    flex: 0 0 auto;
    color: var(--aa-primary-hover, #4a3c92) !important;
    font-size: 0.76rem;
    font-weight: 750;
    text-decoration: none !important;
    white-space: nowrap;
}

.aa-parent-child-card-link:hover,
.aa-parent-child-card-link:focus-visible {
    text-decoration: underline !important;
}

@media (max-width: 700px) {
    .aa-home-page .aa-dashboard-hero-meta-datetime {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: start;
        gap: 10px;
    }

    .aa-parent-child-card {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Fallback for legacy Gibbon file-upload wrappers that use .input-box inside the form. */
body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) {
    width: 100% !important;
    table-layout: auto !important;
}

body.aa-home-page .aa-sidebar :is(form, .input-box):has(input[type="file"]) :is(button:not([type]), button[type="submit"], input[type="submit"]) {
    width: auto !important;
    min-width: 64px !important;
    max-width: 110px !important;
    min-height: 38px !important;
    padding: 7px 12px !important;
    color: #493ca2 !important;
    background: #f4f1ff !important;
    border: 1px solid #d8d1ff !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    word-break: normal !important;
}


/* ========================================================================== 
   v3.12.15 stable Parent recovery: visual order only, no DOM reparenting.
   Publications and all module-owned dashboard DOM remain untouched.
   ========================================================================== */
body.aa-home-page .aa-parent-children-card {
    margin-top: 16px !important;
    margin-bottom: var(--aa-dashboard-section-gap, 18px) !important;
}

.aa-parent-child-card-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.aa-parent-child-card-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    overflow: hidden;
    color: #5849bd;
    background: linear-gradient(180deg, #f0edff 0%, #e7f4ff 100%);
    border: 1px solid #d9d6f8;
    border-radius: 13px;
    font-size: 1rem;
    font-weight: 800;
}

.aa-parent-child-card-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Parent profile-photo upload: keep the native Gibbon wrapper intact and only
   style the controls. Avoid display rewrites on table/tbody/tr wrappers. */
body.aa-home-page .aa-sidebar :is(form, .input-box):has(input[type="file"]) input[type="file"] {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
    padding: 5px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.aa-home-page .aa-sidebar :is(form, .input-box):has(input[type="file"]) input[type="file"]::file-selector-button {
    min-height: 30px !important;
    margin-inline-end: 8px !important;
    padding: 5px 9px !important;
}

body.aa-home-page .aa-sidebar :is(form, .input-box):has(input[type="file"]) :is(button:not([type]), button[type="submit"], input[type="submit"]) {
    width: auto !important;
    min-width: 58px !important;
    max-width: 90px !important;
    min-height: 38px !important;
    padding: 7px 11px !important;
}

/* Keep the original Gibbon parent-name block in DOM for compatibility, but do
   not display it once the richer My Child card is available. */
body.aa-home-page #content-inner.aa-workspace-layout-host > [data-aa-parent-student-intro-replaced="true"] {
    display: none !important;
}

@media (max-width: 700px) {
    .aa-parent-child-card-identity {
        align-items: flex-start;
    }
}

/* ========================================================================== 
   v3.12.16 Parent sidebar upload + legacy child-name cleanup.
   Keep the stable 3.12.15 Parent dashboard DOM; presentation-only cleanup.
   ========================================================================== */

/* Gibbon's legacy upload control is a table-style .input-box. Make it read as
   one joined control: file chooser on the left, submit action on the right. */
body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) {
    float: none !important;
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    overflow: hidden;
    background: #ffffff !important;
    border: 1px solid #dfe4ee !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(27, 31, 44, 0.03);
}

body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) .inline-label {
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 6px !important;
    overflow: hidden;
    vertical-align: middle !important;
    word-break: normal !important;
    background: #ffffff !important;
}

body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) .inline-button {
    display: table-cell !important;
    width: 66px !important;
    min-width: 66px !important;
    height: 46px !important;
    padding: 5px !important;
    vertical-align: middle !important;
    text-align: center !important;
    background: #faf9ff !important;
    border-left: 1px solid #e3e0f2 !important;
}

/* Hide the browser's trailing filename/status text in this narrow sidebar
   control. The selector button remains fully visible and keyboard accessible. */
body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) input[type="file"] {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: transparent !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 8px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) input[type="file"]::file-selector-button {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    color: #493ca2 !important;
    background: linear-gradient(180deg, #faf9ff 0%, #f1edff 100%) !important;
    border: 1px solid #d8d1ff !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
    cursor: pointer;
}

body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) .inline-button :is(button, input[type="submit"]),
body.aa-home-page .aa-sidebar form:has(input[type="file"]) .input-box:has(input[type="file"]) :is(button[type="submit"], input[type="submit"]) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    color: #493ca2 !important;
    background: linear-gradient(180deg, #faf9ff 0%, #f1edff 100%) !important;
    border: 1px solid #d8d1ff !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
}

/* Once Personal Workspace identifies the original Gibbon student-profile
   intro, hide it regardless of when that identification occurs. The richer
   Theme-owned My Child card is explicitly excluded. */
body.aa-home-page #content-inner.aa-workspace-layout-host > [data-aa-parent-student-intro="true"]:not(.aa-parent-children-card),
body.aa-home-page #content-inner > [data-aa-parent-student-intro="true"]:not(.aa-parent-children-card) {
    display: none !important;
}

/* Hide any legacy inline-label status text (for example "Ready") beside the
   native file chooser; the selector button restores its own readable font. */
body.aa-home-page .aa-sidebar .input-box:has(input[type="file"]) .inline-label {
    font-size: 0 !important;
    line-height: 1 !important;
}

/* Timing-independent fallback: Personal Workspace may tag the legacy student
   intro after the Parent status payload has rendered. Hide whenever tagged. */
body.aa-home-page #content-inner [data-aa-parent-student-intro="true"]:not(.aa-parent-children-card) {
    display: none !important;
}

/* ========================================================================== 
   v3.12.18 Parent photo validation + live-DOM polish
   Based on Firefox Inspector evidence from the production Parent dashboard:
   upload markup is #photoUpload > #photoUploadWrap > #submit (not .input-box),
   and the legacy child name is a sibling H4 immediately before the hidden
   parent-student intro section.
   ========================================================================== */

/* Real Gibbon Parent photo-upload DOM. Keep the native form and validation
   wiring intact, but make the live wrapper a compact two-control row. */
body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: 0 !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 62px !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > * {
    min-width: 0 !important;
    margin: 0 !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :first-child,
body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :first-child > *,
body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :first-child > * > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* The right-side live wrapper contains Gibbon status copy plus the submit
   action. Suppress the narrow status text (eg. Ready), then restore the
   button's font explicitly. */
body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :last-child {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap input[type="file"] {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
    color: transparent !important;
    background: #ffffff !important;
    border: 1px solid #d8d1ff !important;
    border-radius: 9px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap input[type="file"]::file-selector-button {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 5px 8px !important;
    color: #493ca2 !important;
    background: linear-gradient(180deg, #faf9ff 0%, #f1edff 100%) !important;
    border: 0 !important;
    border-radius: 7px !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
    cursor: pointer !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :last-child :is(button, input[type="submit"]) {
    box-sizing: border-box !important;
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    color: #493ca2 !important;
    background: linear-gradient(180deg, #faf9ff 0%, #f1edff 100%) !important;
    border: 1px solid #d8d1ff !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

/* Live DOM: the legacy student's name is a direct H4 sibling immediately
   before the Personal Workspace parent-student intro section. */
body.aa-home-page #content-inner > h4:has(+ [data-aa-parent-student-intro="true"]),
body.aa-home-page #content-inner.aa-workspace-layout-host > h4:has(+ [data-aa-parent-student-intro="true"]) {
    display: none !important;
}

@media (max-width: 430px) {
    body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div {
        grid-template-columns: minmax(0, 1fr) 58px !important;
        gap: 6px !important;
        padding: 7px !important;
    }

    body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :last-child,
    body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :last-child :is(button, input[type="submit"]) {
        width: 58px !important;
        min-width: 58px !important;
        max-width: 58px !important;
    }
}


/* ========================================================================== 
   v3.12.18 Parent profile-photo upload validation / submit alignment
   Gibbon core validates parent photos at 240-480 x 320-640px and aspect ratio
   0.60-0.80. Keep the native upload form intact and surface the requirement
   before submit so parents do not hit the generic error6 return.
   ========================================================================== */
body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap #submit > div > :last-child :is(button, input[type="submit"]) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    padding: 0 8px !important;
}

body.aa-home-page .aa-sidebar form#photoUpload .aa-parent-photo-upload-message {
    display: block;
    box-sizing: border-box;
    width: calc(100% - 16px);
    margin: 0 8px 8px;
    padding: 8px 10px;
    border: 1px solid #d9d5f7;
    border-radius: 9px;
    background: #f8f7ff;
    color: #555166;
    font-size: 0.73rem;
    font-weight: 650;
    line-height: 1.35;
}

body.aa-home-page .aa-sidebar form#photoUpload .aa-parent-photo-upload-message.is-valid {
    border-color: #bfe5ce;
    background: #f2fbf6;
    color: #21613c;
}

body.aa-home-page .aa-sidebar form#photoUpload .aa-parent-photo-upload-message.is-error {
    border-color: #efc0c7;
    background: #fff5f6;
    color: #a32639;
}

body.aa-home-page .aa-sidebar form#photoUpload :is(button, input[type="submit"]):disabled {
    cursor: not-allowed !important;
    opacity: 0.55 !important;
}

/* ========================================================================== 
   v3.12.19 Parent Profile Photo form-layout reset
   The live Gibbon form#photoUpload contains the experience bar, form header,
   hidden fields, #photoUploadWrap and Theme validation copy. Earlier generic
   :has(input[type="file"]) rules incorrectly made the whole form a grid.
   Keep the FORM as normal block flow; only #photoUploadWrap owns the two-
   control Browse + Go layout defined above.
   ========================================================================== */
body.aa-home-page .aa-sidebar form#photoUpload {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body.aa-home-page .aa-sidebar form#photoUpload > .aa-form-experience-bar,
body.aa-home-page .aa-sidebar form#photoUpload > header,
body.aa-home-page .aa-sidebar form#photoUpload > #photoUploadWrap,
body.aa-home-page .aa-sidebar form#photoUpload > .aa-parent-photo-upload-message {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

body.aa-home-page .aa-sidebar form#photoUpload > .aa-form-experience-bar {
    margin-bottom: 12px !important;
}

body.aa-home-page .aa-sidebar form#photoUpload #photoUploadWrap {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

body.aa-home-page .aa-sidebar form#photoUpload .aa-parent-photo-upload-message {
    width: 100% !important;
    margin: 8px 0 0 !important;
}
